﻿{extend name="public:base"}
{block name="content"}

      <!-- /.aside -->
      <section id="content">
        <section class="hbox stretch">
          <aside>
            <section class="vbox">
              <header class="header bg-white b-b clearfix">
                {include file="public:mylocal" /}
                <div class="row m-t-sm">
                  <div class="col-sm-11 m-b-xs">
                    <div class="btn-group">
                      <button type="button" class="btn btn-sm btn-default refresh" title="点击刷新"><i class="fa fa-refresh"></i></button>
                      <button type="button" class="btn btn-sm btn-default remove_multi"  table_data="admin,id,true" title="批量删除" {$id|pw_check='admin_1_1'}><i class="fa fa-trash-o"></i></button>
                    </div>
                    <a href="javascript:void(0);" url="{:url('con_add')}" class="layer_new_page btn btn-sm btn-default"  title="新增管理员" {$id|pw_check='admin_1_0'}>
                      <i class="fa fa-plus"></i> 新增管理员
                    </a>
                  </div>
                  <!-- 搜索 -->
                  <div class="col-sm-1 m-b-xs">
                    <div class="input-group">
                      <select class="input-sm form-control m-b" onchange="self.location = '/console/admin/con_lists.html?group_id='+this.value" >
                          <option value="">-- 全部分组 --</option>
                          {volist name="group" id="vo"}
                          <option value="{$vo.id}" {if condition="$vo.id eq $group_id"}selected{/if}  >{$vo.group_name}</option>
                          {/volist}
                      </select>
                    </div>
                  </div>

                </div>
              </header>
              <section class="scrollable wrapper w-f" id="con_lists" style="top:65px;">
                <section class="panel panel-default">
                  <div class="table-responsive" >
                    <table class="table table-striped m-b-none">
                      <thead>
                        <tr>
                          <th width="5%">
                            <input type="checkbox">
                          </th>
                          <th width="5%" class="text-center">ID</th>
                          <th width="15%" class="text-center">账号</th>
                          <th width="15%" class="text-center">分组</th>
                          <th width="7%"  class="text-center"  {$id|pw_check='admin_1_4'}>状态</th>
                          <th width="12%" class="text-center">创建时间</th>
                          <th width="20%" class="text-center">操作</th>
                        </tr>
                      </thead>
                      <tbody>
                        {volist name="lists" id="vo"}
                        <tr>
                          <td>
                            <input type="checkbox" name="keyid[]" value="{$vo.id}" >
                          </td>
                          <td class="text-center">{$vo.id}</td>
                          <td class="text-center">{$vo.username}</td>
                          <td class="text-center">{$vo.group_name}</td>
                          <td class="text-center" {$id|pw_check='admin_1_4'}>
                            {eq name="vo.status" value="1"}
                            <a href="javascript:void(0);" class="btn-primary change_state" table_data="admin,id,{$vo.id},status" >正常</a>
                            {else /}
                            <a href="javascript:void(0);" class="btn-danger change_state" table_data="admin,id,{$vo.id},status" >禁用</a>
                            {/eq}
                          </td>
                          <td class="text-center">{$vo.create_time}</td>
                          <td class="text-center">
                            {if condition="$id eq 0 || $vo.id neq 1"}
                            <a href="javascript:void(0);" url="{:url('con_powers',['id'=>$vo['id']])}" class="layer_new_page active"   data-toggle="class" title="权限分配" {$id|pw_check='admin_1_3'}>
                              <i class="fa fa-paper-plane "></i>
                            </a>&nbsp;&nbsp;
                            <a href="javascript:void(0);" url="{:url('con_edit',['id'=>$vo['id']])}" class="layer_new_page active"  data-toggle="class" title="编辑" {$id|pw_check='admin_1_2'}>
                              <i class="fa fa-edit "></i>
                            </a>&nbsp;&nbsp;
                            <a href="javascript:void(0);"  class="active remove_single" table_data="admin,id,{$vo.id},true" data-toggle="class" title="删除" {$id|pw_check='admin_1_1'}>
                              <i class="fa fa-trash-o"></i>
                            </a>
                            {/if}
                          </td>
                        </tr>
                        {/volist}
                      </tbody>
                    </table>
                  </div>
                </section>
                {include file="public:con_lists_total" /}
              </section>
              {include file="public:con_lists_footer" /}
            </section>
          </aside>
        </section>

    </section>
  </section>
</section>
{/block}
{/extend}
